#include<bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v{2,3,3,5,7,8,8,8};
  ///////////
  for(int i:v) cout << i << " ";
  cout << endl;
  ///////////
  random_shuffle(v.begin(),v.end());
  for(int i:v) cout << i << " ";
  cout << endl;
  ///////////
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  for(int i:v) cout << i << " ";
  cout << endl;
  return 0;
}
